================================================================================
WHAT PROPER FORMATTING DOES -- DECODED FROM A WORKING PACK
================================================================================
Reference: blank_formatted_working.DDP (produced by AJM File Manager v3.1)
Result:    blank_initialized.ddp is now BYTE-IDENTICAL to that working pack.

--------------------------------------------------------------------------------
WHY MY EARLIER IMAGES FAILED -- THREE CONCRETE BUGS
--------------------------------------------------------------------------------
1. SIGNATURE POSITION (the fatal one)
   EOS's recognition bytes 55 AA 00 FF do NOT go at the start of the directory
   block. They sit INSIDE the volume entry, after the 12-byte name and the
   1-byte attribute -> directory offset 0x0D. My earlier guess put them at
   offset 0x00, so EOS never found them and called the pack unformatted.

2. FREE-SPACE FILL BYTE
   Empty blocks are filled with 0xE5, not 0x00. (Same convention as CP/M and
   FAT.) An all-zero pack does not look formatted to EOS.

3. MISSING BOOT BLOCK + INCOMPLETE DIRECTORY
   A real pack has a boot block (logical block 0) and a directory (logical
   block 1) whose entries account for ALL 256 blocks:
     BOOT (1) + DIRECTORY (1) + BLOCKS LEFT (254) = 256.

--------------------------------------------------------------------------------
EXACT STRUCTURE (now fully decoded and reproduced)
--------------------------------------------------------------------------------
LOGICAL block 0  (0x00000): BOOT BLOCK
   Z80 stub + "Initializing Media" text (42 bytes), rest 0x00.

LOGICAL block 1  (0x00400): DIRECTORY BLOCK (HE center format)
   Four 26-byte entries, then 0x00, then 0xE5 fill from offset 0x200:
     name(12, ETX-term, space-pad) | attr(1) | f13..16(4) | count(2 LE) | tail(7)

     'FIRST DIR'   attr 81  [55 AA 00 FF] [00 01]  -- volume label + signature
     'BOOT'        attr 90  [00 00 00 00] [01 00]  -- boot file, block 0, len 1
     'DIRECTORY'   attr D8  [01 00 00 00] [01 00]  -- dir self, block 1, len 1
     'BLOCKS LEFT' attr 01  [02 00 00 00] [FE 00]  -- free hole, block 2, 254

   Entry field layout:
     [0:12]  name (ETX 0x03 terminator, 0x20 padded)
     [12]    attribute byte
     [13:17] start block (LE)   -- volume entry overloads this as the signature
     [17:19] block count (LE)
     [19:26] metadata (allocation / byte-count-in-last-block / date)

LOGICAL blocks 2-255 (0x00800-0x3FFFF): FREE SPACE, all 0xE5.

--------------------------------------------------------------------------------
ATTRIBUTE BITS
--------------------------------------------------------------------------------
   0x80 permanent   0x40 write-protect   0x20 read-protect
   0x10 (boot/sys)  0x08 system          0x02 execute        0x01 catalog/dir
   FIRST DIR  = 81 = permanent + catalog (volume label)
   BOOT       = 90 = permanent + 0x10
   DIRECTORY  = D8 = permanent + write-protect + 0x18
   BLOCKS LEFT= 01 = catalog/hole marker

--------------------------------------------------------------------------------
IMPLICATION FOR THE ON-DRIVE FORMAT ROUTINE
--------------------------------------------------------------------------------
The FORMAT6801 routine handles STEP 1 (writing block headers). This decode
nails STEP 2 (writing a valid directory + 0xE5 free fill). A complete on-ADAM
"format a blank pack" feature must do BOTH:
   1. Write the 256 block headers   (FORMAT6801.ASM -- done, simulated)
   2. Write block 0 boot + block 1 directory, fill 2-255 with 0xE5
      (the AJM File Manager v3.1 formatter in the attached .dsk is the
       reference implementation -- strings 'FORMAT'/'Initializing'/'BLOCKS
       LEFT' confirm its formatter lives there)

blank_initialized.ddp (attached) is ready to drop on the SD-DDP card right now
-- it is identical to a pack the ADAM already accepted.
================================================================================
